﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Practices.Prism.Modularity;
using Prism.Example.ModuleA;
using Prism.Example.ModuleB;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Prism.Extensions.Unity;
using Microsoft.Practices.Unity;

namespace Prism.Example
{
    public class ExampleBootstrapper : UnityBootstrapper
    {
        protected override void ConfigureContainer()
        {
            base.ConfigureContainer();
           // Container.Register<ModuleAInit>();

        }
        protected override DependencyObject CreateShell()
        {
            var shell =  this.Container.Resolve<Shell>();
            Window.Current.Content = shell;
            Window.Current.Activate();             
            return shell;
        }
        protected override void ConfigureModuleCatalog()
        {
            base.ConfigureModuleCatalog();            
            Type moduleA = typeof(ModuleAInit);
            ModuleCatalog.AddModule(new ModuleInfo(moduleA.Name, moduleA.AssemblyQualifiedName));

            Type moduleb = typeof(ModuleBInit);
            ModuleCatalog.AddModule(new ModuleInfo(moduleb.Name, moduleb.AssemblyQualifiedName));
        }

    }
}
